FROM {{ namespace }}/{{ image_prefix }}octavia-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}

{% block octavia_api_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% set octavia_api_packages = [
] %}

{% set octavia_api_plugins_pip_packages = [
    '/plugins/*'
] %}

ADD plugins-archive /

COPY extend_start.sh /usr/local/bin/kolla_octavia_extend_start

RUN if [ "$(ls /plugins)" ]; then \
        {{ macros.install_pip(octavia_api_plugins_pip_packages) }} ; \
    fi \
    && chmod 644 /usr/local/bin/kolla_octavia_extend_start

{{ macros.install_packages(octavia_api_packages | customizable("packages")) }}

{% block octavia_api_footer %}{% endblock %}
{% block footer %}{% endblock %}
